using MicroMsg.Scene;
using MicroMsg.Scene.Video;
using System;
using System.Diagnostics;
using System.Windows;
namespace MicroMsg.UI.UserContrl
{
	public class ChatLeftVideo : ChatVideoItem
	{
		private bool _contentLoaded;
		public ChatLeftVideo()
		{
			this.InitializeComponent();
		}
		protected override void doResume()
		{
			ServiceCenter.sceneDownloadVideo.doSence(this.chatMsg_0.nMsgSvrID);
		}
		protected override void doCancel()
		{
			ServiceCenter.sceneDownloadVideo.doCancelScene(this.chatMsg_0.nMsgSvrID);
		}
		protected override double getProgressValue()
		{
			DownloadVideoContext.ProgressInfo progress = ServiceCenter.sceneDownloadVideo.getProgress(this.chatMsg_0.nMsgSvrID);
			if (progress == null)
			{
				return 0.0;
			}
			if (progress.totalLength <= 0)
			{
				return 0.0;
			}
			return (double)progress.gotLength / (double)progress.totalLength;
		}
		[DebuggerNonUserCode]
		public void InitializeComponent()
		{
			if (this._contentLoaded)
			{
				return;
			}
			this._contentLoaded = true;
			Application.LoadComponent(this, new Uri("/MicroMsg;component/Source/UI/Chat/ChatListItem/ChatLeftVideo.xaml", 2));
		}
	}
}
